package com.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.bean.Goods;
import com.bean.Orders;
import com.bean.Seckill;
import com.bean.User;

/**
 * @author WxrStart
 * @create 2022-06-14 14:27
 */
public interface ISeckillService extends IService<Seckill> {

    /**
     * 添加秒杀活动
     * @param seckill
     * @return
     */
    Integer addSeckill(Seckill seckill);


    /**
     * 根据商品名查询秒杀活动
     * @param goodsName
     * @return
     */
    Seckill getSeckill(String goodsName);

    /**
     * 给中间表orders_goods插入数据
     * @param orderId
     * @param goodsId
     * @return
     */
    Integer addorders_goods(Integer orderId,Integer goodsId);


    /**
     * 给中间表user_seckill插入数据
     * @param userId
     * @param seckillId
     * @return
     */
    Integer adduser_seckill(Integer userId, Integer seckillId);

//    /**
//     * 判断用户是否重复参与秒杀活动
//     * @param user
//     * @return false未参加，true已参加
//     */
//    Boolean getUserBySeckillId(User user);
//


}
